import { TypeVo } from './type';

/**
 * CVE - 威胁列表
 */
export interface CVEListVo {
  cveName: string;                  //  CVE名称，展示在列表的CVE字段
  cvss: string;                     //  CVSS得分
  difficulty: string;               //  利用难度
  targetAssets: Array<TypeVo>;      //  目标资产
  influenceApp: Array<TypeVo>;      //  影响应用
  serverIp: string;                 //  服务器IP，展示在服务器字段

}

export interface CVEDetailVo {
  influenceApp: Array<TypeVo>;
  server: string;
  cve: Array<CVEDetail>;          // CVE对象
  cnnvd: Array<CnnvdDetail>;      // cnnvd对象
}

export interface CVEDetail {
  number: string;
  score: string;
  status: number;
  accessComplexity: string; // 访问复杂性
  accessVector: string; // 可用性影响:
  authentication: string; // 需要验证
  availabilityImpact: string; // 可用性影响
  confidentialityImpact: string; // 保密性影响
  integrityImpact: string; // 完整性影响
  description: string;
  total: number;    // 新增
  useCount: number; // 新增
  cnnvdDetail: Array<CnnvdDetail>;
}

export interface CnnvdDetail {
  name: string;
  cnnvdId: string;
  publishedDate: string;
  modifiedDate: string;
  source: string;
  severity: string;
  vulnType: string;
  thrtype: string;
  vulnDescript: string;
  cveId: string;
  bugtraqId: string;
  vulnSolution: string;
}

export interface CVECount {
  total: number;    // 新增
  useCount: number; // 新增
}

export interface CVEListsVo {
  access_complexity: string;
  access_vector: string;
  authentication: string;
  confidentialityImpact: string;
  cwe: string;
  description: string;
  integrityImpact: string;
  modify_time: string;
  name: string;
  score: string;
  status: string;
}
export interface CNNVDListsVo {
  name: string;
  cnnvdId: string;
  publishedDate: string;
  modifiedDate: string;
  source: string;
  severity: string;
  vulnType: string;
  thrtype: string;
  vulnDescript: string;
  cveId: string;
  bugtraqId: string;
  vulnSolution: string;
}



// 获取cvssV2 评分
export interface ScoreV2 {
  scoreV2: string;
  exploitabilityScoreV2: string;
  impactScoreV2: string;
}
// 获取cvssV3 评分
export interface ScoreV3 {
  scoreV3: string;
  exploitabilityScoreV3: string;
  impactScoreV3: string;
}